8 research outputs found
Polymonadic Programming
Monads are a popular tool for the working functional programmer to structure
effectful computations. This paper presents polymonads, a generalization of
monads. Polymonads give the familiar monadic bind the more general type forall
a,b. L a -> (a -> M b) -> N b, to compose computations with three different
kinds of effects, rather than just one. Polymonads subsume monads and
parameterized monads, and can express other constructions, including precise
type-and-effect systems and information flow tracking; more generally,
polymonads correspond to Tate's productoid semantic model. We show how to equip
a core language (called lambda-PM) with syntactic support for programming with
polymonads. Type inference and elaboration in lambda-PM allows programmers to
write polymonadic code directly in an ML-like syntax--our algorithms compute
principal types and produce elaborated programs wherein the binds appear
explicitly. Furthermore, we prove that the elaboration is coherent: no matter
which (type-correct) binds are chosen, the elaborated program's semantics will
be the same. Pleasingly, the inferred types are easy to read: the polymonad
laws justify (sometimes dramatic) simplifications, but with no effect on a
type's generality.Comment: In Proceedings MSFP 2014, arXiv:1406.153
Auditability for security protocols
Les protocoles de sécurité enregistrent souvent des données disponibles lors de leurs exécutions dans un journal pour une éventuelle analyse a posteriori, aussi appelée audit. En pratique, les procédures d'audit restent souvent informelles, et le choix du contenu des journaux est laissé au bon sens du programmeur. Cette thèse a pour but la formalisation et la vérification des propriétés attendues des journaux d'audit. D'abord, nous nous intéressons à l'utilisation des journaux par les protocoles de sécurité dits optimistes qui, contrairement aux protocoles classiques, reposent sur le contenu des journaux pour remettre certaines vérifications de sécurité à la fin de leur exécution. Nous faisons une étude formelle de deux schémas optimistes : la mise en gage de valeur et le porte-monnaie électronique. En appliquant les techniques issues des langages de processus, nous montrons que les informations enregistrées par leurs implémentations suffisent pour détecter toute tentative de tricherie de participants. Ensuite nous définissons l'auditabilité comme la capacité d'un protocole de collecter assez de preuves pour convaincre une procédure d'audit préétablie (juge). Nous proposons une méthode basée sur les types avec des raffinements logiques, pour vérifier l'auditabilité, et nous l'implémentons dans une extension d'un typeur existant. Nous montrons que la vérification de l'auditabilité se réduit à une vérification par le typage. Nous implémentons également un support logique des pré- et post-conditions génériques pour améliorer le typage modulaire des fonctions d'ordre supérieur.PARIS7-Bibliothèque centrale (751132105) / SudocSudocFranceF
Lightweight monadic programming in ML
This is a extended version of a shorter paper of the same title. It differs from the short paper in the following regard. The short version of the paper includes a section 6.2 in which we show how to encode information flow controls while accounting for leaks through side effects. We indicated that in order to support this encoding, mild extensions (in the form of parameterized monads) to the core type system described in earlier sections of the paper would be necessary. We have since realized that these extensions while feasible, are not as straightforward as we thought. This version of the paper includes a reworked section 6.2. We now present an information flow encoding, suitable for use with pure programs, that can be handled by our current system with no extensions at all. In Appendix A, we discuss the encoding of information flow with side effects in detail. We consider encodings in terms of parameterized monads, and sketch the shape of an extension to the core system to handle these parameterized monads. Appendix B (also not present in the short paper, for space reasons) formalizes the soundness of the parameterized-monad information flow encoding via a translation to MLIF, the core language of FlowCaml. This result establishes that our information flow encoding correctly enforces a noninterference property for programs that include side effects. Many useful programming constructions can be expressed as monads. Examples include probabilistic computations, time-varying expressions